<%@ page language="java" contentType="text/html; charset=UTF-8" import="com.vx.vo.*" pageEncoding="UTF-8"%>
<%@ include file="/resources/js/commons.jspf" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>请假管理</title>
</head>
<body>
 	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
		  <tr>
		    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
		      <tr>
		        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
		          <tr>
		            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
		              <tr>
		                <td width="6%" height="19" valign="bottom"><div align="center"><img src="${pageContext.request.contextPath }/resources/images/tb.gif" width="14" height="14" /></div></td>
		                <td width="94%" valign="bottom"><span class="STYLE1">借阅单列表</span></td>
		              </tr>
		            </table></td>
		            <td><div align="right"><span class="STYLE1">
		              </span></div></td>
		          </tr>
		        </table></td>
		      </tr>
		    </table></td>
		  </tr>
		  <tr>
		        <td height="20" bgcolor="#FFFFFF" class="STYLE10" colspan="8"><div align="left">
					<a href="${pageContext.request.contextPath }/borrow/addBorrowView">添加借阅单</a>
				</div></td>
		  </tr> 
		  <tr>
		    <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce" onmouseover="changeto()"  onmouseout="changeback()">
		      <tr>
		        <td width="5%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">ID</span></div></td>
		        <td width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">标题</span></div></td>
		        <td width="5%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">申请人Code</span></div></td>
		        <td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">文件id</span></div></td>
		        <td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">时间</span></div></td>
		        <td width="5%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">状态</span></div></td>
		        <td width="25%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">操作</span></div></td>
		      </tr>
		      <c:if test="${borrowList!=null}">
				<c:forEach items="${borrowList}" var="borrow" varStatus="n">
				<tr>
					<td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center">${borrow.id }</div></td>
			        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">${borrow.title }</div></td>
			        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">${borrow.usercode }</div></td>
			        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">${borrow.filesyscode }</div></td>
			        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">${borrow.time }</div></td>
			        <c:if test="${borrow.status==0 }">
			        <td height="20" bgcolor="#FFFFFF" class="STYLE19">
			        	<div align="center">
			 					待提交
		            	</div>
		            </td>
		            <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE21">
						<a href="${pageContext.request.contextPath }/borrow/deleteBorrow?borrowId=${borrow.id }" >删除</a>
						<a href="${pageContext.request.contextPath }/borrow/startPross?borrowId=${borrow.id }" >申请请假</a>
					</div></td>
			        </c:if>
			        <c:if test="${borrow.status==1 }">
			        <td height="20" bgcolor="#FFFFFF" class="STYLE19">
			        	<div align="center">审批中</div>
		            </td>
			        <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE21">
			        <a href="${pageContext.request.contextPath }/borrow/viewTaskCurrent?borrowId=${borrow.id }" >查看审核记录</a>
			        </div></td>
			        </c:if>
			        <c:if test="${borrow.status==2 }">
			        <td height="20" bgcolor="#FFFFFF" class="STYLE19">
			        	<div align="center">
			 					审核通过
		            	</div>
		            </td>
			        <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE21">
						<a href="leaveBillAction_delete.action?id=1" >删除</a>
						<a href="${pageContext.request.contextPath }/borrow/viewTaskCurrent?borrowId=${borrow.id }" >查看审核记录</a>
			        </div></td>
			        </c:if>
					</tr>
				</c:forEach>
			</c:if>
			<c:if test="${borrowList==null}">
				<tr></tr>
			</c:if>		      
		    </table></td>
		  </tr>
	</table>
</body>
</html>